# _*_ coding utf-8 _*_
# FILENAME：shipperModel.py
# DESCRIPTION: 承运商 Model
# AUTH: jarvis zhang
# DATE: 2022/6/2 10:00 下午

from sqlalchemy import Index, Column, String, Integer, DECIMAL
from models.baseModel import BaseModel

## 承运商
class ShipperModel(BaseModel):
    # 表的名字:
    __tablename__ = 'shipper'
    # 表的结构:
    version_name = Column(String(255), index=True, comment='版本名称')
    # 添加索引和表注释
    __table_args__ = ({'comment': '承运商表'})

## 承运商明细表
class ShipperDetailsModel(BaseModel):
    # 表的名字:
    __tablename__ = 'shipper_details'
    # 表的结构:
    shipper_id = Column(Integer, comment='主表编号')
    shipper_name = Column(String(64), comment='承运商名称')
    van_code = Column(String(32), comment='车牌')
    carriage_length = Column(DECIMAL(10, 2), comment='车厢长')
    carriage_width = Column(DECIMAL(10, 2), comment='车厢宽')
    carriage_height = Column(DECIMAL(10, 2), comment='车厢高')
    daily_fixed_cost = Column(DECIMAL(10, 2), comment='车辆每日固定成本')
    operating_costs = Column(DECIMAL(10, 2), comment='车辆运营成本（元/公里）')
    # 添加索引和表注释
    __table_args__ = ({'comment': '承运商明细表'})


